package m.stock.v1;

import com.google.gson.GsonBuilder;

/**
 * Created by maojianfeng on 8/4/16.
 */
public class StockRecord{
    private String date;
    private String stockCode;
    private String stockAbbrName;
    private Double chg;
    private Double price;
    private Double macdDiff;
    private Double macdDea;
    private Double openingPrice;
    private Double closingPrice;
    private Double tradingVolumn;
    private String buySignal;
    private String lastShape;
    private Double chgBefore;
    private Double chgMoney;
    private Double amplitude;
    private Double dealMoney;
    private Double macdComputed;

    public String getDate() {
        return date;
    }

    public void setDate(String date) {
        this.date = date;
    }

    public String getStockCode() {
        return stockCode;
    }

    public void setStockCode(String stockCode) {
        this.stockCode = stockCode;
    }

    public String getStockAbbrName() {
        return stockAbbrName;
    }

    public void setStockAbbrName(String stockAbbrName) {
        this.stockAbbrName = stockAbbrName;
    }

    public Double getChg() {
        return chg;
    }

    public void setChg(Double chg) {
        this.chg = chg;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    public Double getMacdDiff() {
        return macdDiff;
    }

    public void setMacdDiff(Double macdDiff) {
        this.macdDiff = macdDiff;
    }

    public Double getMacdDea() {
        return macdDea;
    }

    public void setMacdDea(Double macdDea) {
        this.macdDea = macdDea;
    }

    public Double getOpeningPrice() {
        return openingPrice;
    }

    public void setOpeningPrice(Double openingPrice) {
        this.openingPrice = openingPrice;
    }

    public Double getClosingPrice() {
        return closingPrice;
    }

    public void setClosingPrice(Double closingPrice) {
        this.closingPrice = closingPrice;
    }

    public Double getTradingVolumn() {
        return tradingVolumn;
    }

    public void setTradingVolumn(Double tradingVolumn) {
        this.tradingVolumn = tradingVolumn;
    }

    public String getBuySignal() {
        return buySignal;
    }

    public void setBuySignal(String buySignal) {
        this.buySignal = buySignal;
    }

    public String getLastShape() {
        return lastShape;
    }

    public void setLastShape(String lastShape) {
        this.lastShape = lastShape;
    }

    public Double getChgBefore() {
        return chgBefore;
    }

    public void setChgBefore(Double chgBefore) {
        this.chgBefore = chgBefore;
    }

    public Double getChgMoney() {
        return chgMoney;
    }

    public void setChgMoney(Double chgMoney) {
        this.chgMoney = chgMoney;
    }

    public Double getAmplitude() {
        return amplitude;
    }

    public void setAmplitude(Double amplitude) {
        this.amplitude = amplitude;
    }

    public Double getDealMoney() {
        return dealMoney;
    }

    public void setDealMoney(Double dealMoney) {
        this.dealMoney = dealMoney;
    }

    public Double getMacdComputed() {
        return macdComputed;
    }

    public void setMacdComputed(Double macdComputed) {
        this.macdComputed = macdComputed;
    }

    @Override
    public String toString() {
        return new GsonBuilder().setPrettyPrinting().create().toJson(this);
    }

    public int compareTo(String o) {
        return o.compareTo(date);
    }
}
